package pers.hll.annotation;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * An annotation to create utility classes.
 * <br>If a class is annotated with {@code @ConstantClass}, the following things happen to it:
 * <ul>
 *   <li>It is marked final.</li>
 *   <li>If any constructors are declared in it, an error is generated.
 *       Otherwise, a private no-args constructor is generated; it throws a {@code UnsupportedOperationException}.</li>
 *   <li>All fields in the class are marked public static final.</li>
 * </ul>
 */
@Target({ElementType.TYPE})
@Retention(RetentionPolicy.SOURCE)
public @interface ConstantClass {
}
